package com.binyouwei.designpatterns.behavior.responsibility_link;

/**
 * @author 宾有为
 * @date 2024/7/17 20:11
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：责任链模式 - 处理者A
 **/
public class ConcreteHandlerA extends ResponsibilityHandler {
    @Override
    public void handleRequest(int request) {
        if (request >= 0 && request < 10) {
            System.out.println("ConcreteHandlerA handled request: " + request);
        } else if (successor != null) {
            successor.handleRequest(request);
        }
    }
}